<template>
  <div class="about">
    <v-header />
    <v-sidebar />
    <div :class="isCollapse ? 'el-tagnavigation-no' : 'el-tagnavigation'">
      <v-tags></v-tags>
      <div class="content">
        <router-view v-slot="{ Component }">
          <transition name="move" mode="out-in">
            <keep-alive :include="tagsList">
              <component :is="Component" />
            </keep-alive>
          </transition>
        </router-view>
      </div>
    </div>
  </div>
</template>

<script>
import vHeader from "../components/Header.vue";
import vSidebar from "../components/Sidebar.vue";
import vTags from "../components/Tags.vue";
export default {
    computed: {
        isCollapse() {
            // 这里的数据就是从vuex取得
             return this.$store.state.tab.isCollapse
         }
    },
    components: {
        vHeader,
        vSidebar,
        vTags,
    },

};
</script>

<style scoped>
.el-tagnavigation {
  position: absolute;
  border-top: 1px solid #f4f4f4;
  background-color: #fff;
  color: #fff;
  text-align: left;
  line-height: 40px;
  top: 50px;
  left: 250px;
  right: 0px;
  height: 40px;
}
.el-tagnavigation-no {
  position: absolute;
  border-top: 1px solid #f4f4f4;
  background-color: #fff;
  color: #fff;
  text-align: left;
  line-height: 40px;
  top: 50px;
  left: 64px;
  right: 0px;
  height: 40px;
}
.content {
  background-color: #f0f2f5;
  width: 100%;
  height: 95.5vh;
  overflow: auto;  /* 添加溢出滚动条 */
  overflow-x: hidden;  /* 隐藏横向滚动条 */
}
</style>

